package com.eoner.baselibrary.utils;

import android.os.Handler;

public class DoubleClickUtil {
    static long lastClickTime;

    public static boolean isClick(long timeLimit) {
        if (System.currentTimeMillis() - lastClickTime < timeLimit) {
            return false;
        } else {
            lastClickTime = System.currentTimeMillis();
            new Handler().postDelayed(() -> lastClickTime = 0, timeLimit);
            return true;
        }
    }
}

